package com.zl.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MaxUploadSizeExceededException;

import java.io.IOException;

/**
 * @Author ljm
 * @Date 2021/11/26 9:46
 */
@Controller
public class TestAOP {
    @RequestMapping("/test")
    @ResponseBody//以json格式返回数据
    public String test() throws IOException, IllegalAccessException {
        String str = "adadeaw";
        /*IllegalAccessException exception = new IllegalAccessException();*/
        MaxUploadSizeExceededException exception = new MaxUploadSizeExceededException(10);
        throw exception;
        /*System.out.println("这是测试AOP方法：" + str + (10/0));
        return str;*/
    }
}
